﻿<UserControl x:Class="ImageView.ViewVideo"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:common="clr-namespace:ImageUtils.Common;assembly=ImageUtils.Common"
             mc:Ignorable="d" 
              d:DesignHeight="469" d:DesignWidth="907">
    <Grid Background="#FF333333">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="25"/>
        </Grid.RowDefinitions>
        <MediaElement LoadedBehavior="Manual" x:Name="Media" Grid.Row="0" Volume="{Binding Value, ElementName=VolumeSlider}" MediaOpened="Media_MediaOpened" MediaEnded="Media_MediaEnded"/>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Column="0" Orientation="Horizontal" Background="#FF595959">

                <Button x:Name="BtnClose" Width="50" Content="Close" Margin="5,0,0,0" Click="BtnClose_Click"/>
                
                <Button Click="BtnPause_Click" x:Name="BtnPause" Width="50" Margin="5,0,0,0">
                    <Image Source="../images/player_pause.png"/>
                </Button>
                <Button Click="BtnVolume_Click" x:Name="BtnVolume" Width="50" Margin="5,0,0,0">
                    <Image Source="../images/kmix.png"/>
                </Button>
            </StackPanel>
            <Grid Grid.Column="1" Background="#FF595959">
            <Slider x:Name="SeekSlider" PreviewMouseDown="SeekSlider_PreviewMouseDown" PreviewMouseUp="SeekSlider_PreviewMouseUp" VerticalAlignment="Center"/>
            </Grid>
        </Grid>
        <StackPanel x:Name="VolPanel" HorizontalAlignment="Left" Margin="10,0,0,0" Width="246" Height="30" VerticalAlignment="Bottom" Background="#99FFFFFF" Orientation="Horizontal" Visibility="Hidden">
            <Button x:Name="BtnMute" Width="30" Margin="0" Click="BtnMute_Click">
                <Image Source="../images/kmixdocked_error.png"/>
            </Button>
            <common:EditableSlider x:Name="VolumeSlider" Width="200" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Maximum="1" Value="1" Background="#FF595959"/>

        </StackPanel>
        
        <StackPanel VerticalAlignment="Center" Grid.Row="2" Orientation="Horizontal">
            <TextBlock x:Name="TimeText" Foreground="White" Text="00:00"/>
            <TextBlock Text="/" Foreground="White" Margin="5,0" />
            <TextBlock x:Name="CurrTimeText" Foreground="White" Text="00:00"/>
        </StackPanel>
        
    </Grid>
</UserControl>
